<template>
  <div class="not-found-container">
    <el-container>
      <el-main>
        <el-card class="not-found-card" shadow="hover">
          <h1 class="not-found-title">404 Not Found</h1>
          <p class="not-found-description">您所觅之页，已逝于尘封。</p>
          <el-button class="not-found-button" type="primary" @click="goHome">返回</el-button>
        </el-card>
      </el-main>
    </el-container>
  </div>
</template>

<script>
import router from "../../router/index.js";

export default {
  name: 'NotFound',
  methods: {
    goHome() {
      // 使用 Vue Router 路由导航返回首页
      router.push('/');
    }
  }
};
</script>

<style scoped>
/* 自定义样式 */
.not-found-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #ffe6b3; /* 浅橘黄色背景 */
}

.not-found-card {
  text-align: center;
  padding: 20px;
  background-color: #fff8e1; /* 浅橘黄色卡片背景 */
}

.not-found-title {
  color: #ff9800; /* 橙色文字颜色 */
  font-size: 28px;
  margin-bottom: 10px;
}

.not-found-description {
  color: #555;
  margin-bottom: 20px;
}

.not-found-button {
  background-color: #ff9800; /* 橙色按钮背景 */
}
</style>
